package com.lapian.designmode.observer;

/**
 * 创建日期：2021/11/12 10:48
 *
 * @author tony.sun
 * 类说明：
 */

public class Client {
    public static void main(String[] args) {
        //创建接入方currentConditions
        CurrentConditions currentConditions=new CurrentConditions();//这个用于展示的
        ZhangShangApp zhangShangApp=new ZhangShangApp();//这个用于展示的
        //创建WeatherData 并将 接入方currentConditions 传递到WeatherData中
        WeatherDate weatherDate=new WeatherDate(currentConditions,zhangShangApp);
        //更新天气情况
        weatherDate.setData(30,150,40);
        System.out.println("---------------------------------------------");
        weatherDate.setData(37,166,20);
    }
}
